<extend name='Public/admin/content' />

<block name="button">
  <div class="nowrap pull-right" style="margin-top:10px">
    <button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-sm layui-btn-danger'>
      <i class='fa fa-remove'></i> 删除用户
    </button>
  </div>
</block>

<block name="content">
  <!-- 表单搜索 开始 -->
  <form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">学生护照</label>
      <div class="layui-input-inline">
        <input name="passport" value="{$Think.get.passport|default=''}" placeholder="请输入护照" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">手机号</label>
      <div class="layui-input-inline">
        <input name="phone" value="{$Think.get.phone|default=''}" placeholder="请输入手机号" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <label class="layui-form-label">绑定时间</label>
      <div class="layui-input-inline">
        <input name="date" id='range-date' value="{$Think.get.date|default=''}"
               placeholder="请选择绑定时间" class="layui-input">
      </div>
    </div>

    <div class="layui-form-item layui-inline">
      <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
  </form>
  <!-- 表单搜索 结束 -->
  <form onsubmit="return false;" data-auto="true" method="post">
    <if condition="empty($list)">
      <p class="help-block text-center well">没 有 记 录 哦！</p>
      <else/>
      <input type="hidden" value="resort" name="action"/>
      <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
        <tr>
          <th class='list-table-check-td'>
            <input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
          </th>
          <th class='text-left nowrap'>头像</th>
          <th class='text-left nowrap'>真实姓名</th>
          <th class='text-left nowrap'>微信昵称</th>
          <th class='text-left nowrap'>护照</th>
          <th class='text-left nowrap'>手机号</th>
          <th class='text-left nowrap'>绑定时间</th>
          <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        <tbody>

        <foreach name="list" item="vo">

          <tr>
            <td class='list-table-check-td'>
              <input class="list-check-box" value='{$vo.id}' type='checkbox'/>
            </td>
            <td class='text-left nowrap'>
              <img data-tips-image="{$vo.avatar|default='http://appoint.applinzi.com/Public/Admin/default.png'}"  class="img-thumbnail m-t-xs img-responsive" src="{$vo.avatar|default='http://appoint.applinzi.com/Public/Admin/default.png'}" style="max-height: 60px; max-width: 60px;" />
            </td>
            <td class='text-left nowrap'>
              <if condition="$vo.name neq ''">
                {$vo.name}
                <elseif condition="$vo.last_name neq ''"/>
                {$vo.first_name} {$vo.last_name}
                <else />
                <span class='color-desc'>还没有设置姓名</span>
              </if>
            </td>
            <td class='text-left nowrap'>
              {$vo.nickname|default="<span class='color-desc'>还没有设置昵称</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.passport|default="<span class='color-desc'>还没有设置护照</span>"}
            </td>
            <td class='text-left nowrap'>
              {$vo.tel|default="<span class='color-desc'>还没有设置手机号</span>"}
            </td>
            </td>
            <td class='text-left nowrap'>
              {$vo.gmt_modified|date="Y-m-d H:i:s",###}
            </td>
            <td class='text-left nowrap'>
              <if condition='auth("$classuri/del")'>
                <span class="text-explode">|</span>
                <a data-update="{$vo.id}" data-field='delete' data-action='{:url("user_del")}'
                   href="javascript:void(0)">删除</a>
              </if>
            </td>
          </tr>
        </foreach>
        </tbody>
      </table>
      <if condition=" isset($page_content)"><p>{$page_content}</p></if>

    </if>
    <script>
      window.laydate.render({range: true, elem: '#range-date', format: 'yyyy/MM/dd'});
    </script>
  </form>

</block>